package palmtop.com.palmtop.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import palmtop.com.palmtop.service.NotificationService;

public class MyReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        // TODO: This method is called when the BroadcastReceiver is receiving
        // an Intent broadcast.
//        throw new UnsupportedOperationException("Not yet implemented");
        if(intent.getAction().equals("com.example.demo.destroy")){
            Intent sevice = new Intent(context, NotificationService.class);
            context.startService(sevice);
        }
    }
}
